﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
 	<!-- 包含公共的JSP代码片段 -->
	
<title>无线点餐平台</title>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="style/js/jquery.js"></script>
<script type="text/javascript" src="style/js/page_common.js"></script>
<script type="text/javascript" src="style/js/DatePicker.js" ></script>
<link href="style/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="style/css/index_1.css" />
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
	<div id="TitleArea_Head"></div>
	<div id="TitleArea_Title">
		<div id="TitleArea_Title_Content">
			<img border="0" width="13" height="13" src="style/images/title_arrow.gif"/> 餐桌列表
		</div>
    </div>
	<div id="TitleArea_End"></div>
</div>


<!-- 过滤条件 -->
<div id="QueryArea">
	<form action="BaseBoardServlet?action=findBoard" method="post">
		<!-- <input type="hidden" name="method" value="search"> -->
		<input type="text" name="keyword" title="请输入餐桌名称">
		<input type="submit" value="搜索">
	</form>
</div>


<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
            <tr align="center" valign="middle" id="TableTitle">
				<td>编号</td>
				<td>桌名</td>
				<td>状态</td>
				<td width="200px">预定时间</td>
				<td>操作</td>
			</tr>
		</thead>	
		<!--显示数据列表 -->
        <tbody id="TableData">
		<c:forEach var="board" items="${datas}" >
			<tr class="TableDetail1">
				<td align="center">${board.id }&nbsp;</td>
				<td align="center">${board.name }&nbsp;</td>
				<c:if test="${board.state!=0}">
				<td align="center">已预定</td>
				</c:if>
				<c:if test="${board.state==0 }">
				<td align="center">空闲</td>
				</c:if>
				<c:if test="${board.state==0 }">
				<td></td>
				</c:if>
				<c:if test="${board.state!=0}">
				<td align="center">${board.btime }</td>
				</c:if>
				<%-- <td align="center" >
				<c:if test="${board.state!=0}">
				<input value="${board.btime }" />
				&nbsp;</c:if></td> --%>
				
				
				<%-- <c:if test="${board.state==2 }">
				<td align="center">退桌</td>
				</c:if> --%>
				<!-- <td align="center"><input type="datetime-local" name="btime" value="" placeholder="选择预定时间" /></td> -->
				<!-- <td><input type="text" name="btime" readonly="readonly" class="form-control" onclick="setday(this)" />
				</td> -->
				<td>
					<c:if test="${board.state==0 }">
					<a href="BaseBoardServlet?action=orderBoard&id=${board.id}&state=1" class="FunctionButton">预定</a>
					</c:if>	
					<c:if test="${board.state!=0 }">
					<a href="BaseBoardServlet?action=orderBoard&id=${board.id}&state=0" class="FunctionButton">退桌</a>
					</c:if>				
					<a href="BaseBoardServlet?action=delBoard&id=${board.id}" onClick="return delConfirm();"class="FunctionButton">删除</a>				
				</td>
			</tr>
        </c:forEach>
			<%-- <tr class="TableDetail1">
				<td align="center">2&nbsp;</td>
				<td align="center"> 巴黎&nbsp;</td>
				<td align="center">空闲</td>
				<td align="center"></td>
				<td>
					<a href="/wirelessplatform/board.html?method=update&id=2&isBook=1" class="FunctionButton">预定</a>				
					<a href="delBoard?id=${board.id}" onClick="return delConfirm();"class="FunctionButton">删除</a>				
				</td>
			</tr> --%>
        
			<!-- <tr class="TableDetail1">
				<td align="center">3&nbsp;</td>
				<td align="center"> 丹麦&nbsp;</td>
				<td align="center">空闲</td>
				<td align="center"></td>
				<td>
					<a href="/wirelessplatform/board.html?method=update&id=3&isBook=1" class="FunctionButton">预定</a>				
					<a href="/wirelessplatform/board.html?method=delete&id=3" onClick="return delConfirm();"class="FunctionButton">删除</a>				
				</td>
			</tr>
        
			<tr class="TableDetail1">
				<td align="center">5&nbsp;</td>
				<td align="center"> 伦敦&nbsp;</td>
				<td align="center">空闲</td>
				<td align="center"></td>
				<td>
					<a href="/wirelessplatform/board.html?method=update&id=5&isBook=1" class="FunctionButton">预定</a>				
					<a href="/wirelessplatform/board.html?method=delete&id=5" onClick="return delConfirm();"class="FunctionButton">删除</a>				
				</td>
			</tr> -->
        
        </tbody>
    </table>
	
   <!-- 其他功能超链接 -->
	<div id="TableTail" align="center">
		<div class="FunctionButton"><a href="addBoard.html">添加</a></div>
    </div> 
</div>
</body>
</html>
